1. Field of the Invention
The present invention relates to an image encoding device for dividing a high-resolution image into a plurality of partial images and compressing/encoding the partial images in parallel, and to an image decoding device for decoding the compressed/encoded image.
2. Description of the Related Art
A motion picture includes a sequence of frames. With codecs used in recording apparatus for use in broadcasting stations or for household use, a motion picture is compressed/encoded frame by frame or by using differences between frames, for example. The amount of calculation of a codec required for compression/encoding increases as the number of pixels of one frame (spatial resolution) and the frame rate (temporal resolution) increase.
In order to compress/encode such a motion picture in real time, there are many methods known in the art in which the compression/encoding process is parallelized by spatially dividing each frame and temporally dividing a plurality of frames. However, since the motion picture compressing/encoding process is a technique for efficiently reducing the amount of data by utilizing the spatial and temporal correlation between frames, the division process for parallelization may lower the compression efficiency. In view of this, there are parallelization methods proposed in the art in which the decrease in the compression efficiency due to the division process is minimized. Although there are various combinations, these proposals are generally classified into two, in terms of the basic approach, i.e., the spatial division and the temporal division (e.g., Japanese Laid-Open Patent Publication No. 59-97272.
In the “spatial division”, a high-resolution video signal is spatially divided into a plurality of partial images. Individual partial images are encoded in parallel by a codec to obtain compressed data. Finally, individual compressed data are integrated together. The codec does not need to have such a high performance that a high-resolution image can be processed, and it only needs to have such a performance that a low-resolution image can be processed. With the spatial division, the efficiency of the intra-frame compression, which utilizes the correlation between pixels that are spatially adjacent to each other, lowers at boundaries between partial images. Conventional methods attempted to not lower the inter-frame compression efficiency by dividing a high-resolution image into partial images so that there are overlaps between partial images over the motion compensation search range. The spatial division is advantageous in that the process delay can be kept small because the process unit for parallelization can be limited to one frame.
In the “temporal division”, a motion picture is divided into portions by reproduction time by the unit of one frame or a plurality of frames, while keeping the resolution of each frame as it is. As a result, there are a plurality of groups of frames, with each group having a relatively short duration. The individual groups of frames are processed in parallel by a codec to obtain compressed data. Finally, compressed data are integrated together. The temporal division does not lower the intra-frame compression efficiency because the correlation between adjacent pixels within a frame can be utilized to the maximum extent. However, it is necessary, for the groups of frames to be independently processed in parallel, that frames of different groups do not reference one another, thus lowering the inter-frame compression efficiency. For example, where the parallel processing is performed by the unit of GOPs (Group Of Picture) in MPEG-2 of “ISO/IEC 13818-2 Information technology—Generic coding of moving pictures and associated audio information: Video”, it is necessary to use the closed GOP where GOPs do not reference one another. Processing a plurality of GOPs in parallel requires a large-capacity frame buffer memory, thus increasing the process delay. Since an increase in the process delay makes more difficult the code quantity control of controlling the quantity of code generated to be a predetermined quantity, there are only limited conditions under which the temporal division can be used for parallel processing.
Therefore, it is often the case with conventional methods that when a high-resolution motion picture is divided into pieces for compression/encoding, images are spatially divided into pieces for parallel processing.
If an input video is spatially divided into pieces for parallel compression/encoding by a known method, the compression/encoding difficulty varies between the spatially-divided partial images because the partial images contain different graphic patterns from one another. Therefore, if an image is compressed/encoded using the same compression parameters with any of many compression/encoding schemes which employ a variable-length code, the quantity of code generated varies between partial images. On the other hand, if the compression parameters are adjusted for each partial image so as to even out the quantities of code generated for different partial images, the compression distortion then varies between partial images, thus making the division boundaries more conspicuous on the screen. It is very difficult to control the quantity of code so that a predetermined total quantity of code will be generated eventually for all partial images while independently processing the individual partial images in parallel.
Particularly, the problem above is more pronounced when spatial division is used with MPEG-4 AVC/H.264 (e.g., “ISO/IEC 14496-10 Information technology—Coding of audio-visual objects—Part 10: Advanced video coding”) which has drawn public attention for its high compression efficiency. MPEG-4 AVC/H.264 significantly improves the compression efficiency by referencing adjacent pixels within each frame. However, at the boundary between partial images, it is not possible to use the correlation between pixels belonging to different partial images even if the pixels are spatially adjacent to each other. Therefore, if the spatial image division is used with MPEG-4 AVC/H.264, it is not possible to avoid a decrease in the intra-frame compression efficiency that is even more significant than those with more traditional compression schemes.